<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- Tell the browser to be responsive to screen width -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <!-- Favicon icon -->
    <link rel="icon" type="image/png" sizes="16x16" href="../assets/images/favicon.ico">
    <title>壹脉智能CRM</title>
    <!-- Bootstrap Core CSS -->
    <link href="./css/bootstrap.min.css" rel="stylesheet">
    <link href="./css/style.min.css" rel="stylesheet">
    <link href="./css/colors/default.css" id="theme" rel="stylesheet">
    <link rel="stylesheet" href="./css/diy.min.css">

    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body class="fix-header fix-sidebar card-no-border">
<div class="preloader">
    <div class="loader">
        <div class="loader__figure"></div>
        <p class="loader__label">壹脉</p>
    </div>
</div>
<div id="main-wrapper">
    <header class="topbar">
        <nav class="navbar top-navbar navbar-expand-md navbar-light">
            <div class="navbar-header">
                <a class="navbar-brand" href="/">
                    <b>
                        <img src="../assets/images/diy/yimai.png" alt="homepage" class="dark-logo"/>
                        <!--<img src="../assets/images/logo-light-icon.png" alt="homepage" class="light-logo"/>-->
                    </b>
                    <span>
                        <span class="fs18 cblue p-l-6 fbold">壹脉智能CRM</span>
                    </span>
                </a>
            </div>
            <div class="navbar-collapse">
                <ul class="navbar-nav mr-auto">
                    <li class="nav-item"> <a class="nav-link nav-toggler hidden-md-up waves-effect waves-dark" href="javascript:void(0)"><i class="sl-icon-menu"></i></a> </li>
                    <li class="nav-item"> <a class="nav-link sidebartoggler hidden-sm-down waves-effect waves-dark" href="javascript:void(0)"><i class="sl-icon-menu"></i></a> </li>
                </ul>
                <user-head></user-head>

            </div>
        </nav>
    </header>
    <aside class="left-sidebar">
        <div class="scroll-sidebar">
            <company-position></company-position>
            <nav class="sidebar-nav p-0">
                <c-slider current="9"></c-slider>
            </nav>
        </div>
    </aside>
    <div class="page-wrapper">

        <div class="container-fluid">

            <div class="row page-titles">
                <div class="col-md-5 align-self-center">
                    <h3 class="text-themecolor">数据统计</h3>
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item"><a href="javascript:void(0)">HOME</a></li>
                        <li class="breadcrumb-item">提现管理</li>
                        <li class="breadcrumb-item active">分销订单</li>
                    </ol>
                </div>
            </div>

            <div class="row bgfff">
                <ul class="nav w100p nav-tabs customtab position-relative" role="tablist">
                    <li class="nav-item" v-for="(v,k) in navs" :key="k">
                        <a class="nav-link curpointer" data-toggle="tab" role="tab"
                           :class="v.id == navs_id ? 'active' : '' "
                           @click="changeNav(v.id)">
                            <span class="hidden-sm-up">
                                <i class="ti-home"></i>
                            </span>
                            <span class="hidden-xs-down">{{v.label}}</span>
                        </a>
                    </li>
                </ul>

                <div class="d-flex p-t-20 w100p p-r-31 p-b-17">
                    <div class="" v-if="navs_id==2"></div>
                    <div class="disflex">
                        <span>
                            今日提现笔数:
                        </span>
                    </div>
                </div>

                <div class="row w100p p-l-30">
                    <div class="col-12">
                        <div class="card m-b-0" v-if="navs_id==1">
                            <table class="align-cen-table textc display nowrap table table-hover table-bordered bgf6f9fa m-b-20">
                                <thead>
                                <tr>
                                    <th>
                                        <span class="w16 h16 bradius4 bced d-inline-block mdi position-relative top3"
                                              :class="allChecks? 'mdi-check checks' : '' "
                                              @click="checkAll"
                                        ></span>
                                    </th>
                                    <th>公司名称</th>
                                    <th>管理员名称</th>
                                    <th>联系电话</th>
                                    <th>订单金额（元）</th>
                                    <th>实际到账金额（元）</th>
                                    <th>可提现金额（元）</th>
                                    <th>申请提现金额（元）</th>
                                    <th>申请时间</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody class="bgfff">
                                <tr v-for="(v,k) in lists" :key="k" class="curpointer">
                                    <td>
                                                <span class="w16 h16 bradius4 bced d-inline-block mdi position-relative top3"
                                                      :class="selectRows.includes(v) ? 'mdi-check checks':''"
                                                      @click.stop="chooseRow(v)"></span>
                                    </td>
                                    <td :title="v.ordersNo">{{v.ordersNo}}</td>
                                    <td>{{v.ordersId}}</td>
                                    <td :title="v.nickeName">{{v.nickeName}}</td>
                                    <td :title="v.phone">{{v.phone}}</td>
                                    <td :title="v.locationAddress + v.detailedAddress">{{v.locationAddress + v.detailedAddress}}</td>
                                    <td :title="v.goodsName">{{v.goodsName}}</td>
                                    <td :title="v.specAttribute">{{v.specAttribute}}</td>
                                    <td :title="v.specAttribute">{{v.specAttribute}}</td>
                                    <td>
                                        <span @click="operationConfirm(1)">通过</span>
                                        <span @click="operationConfirm(2)">驳回</span>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                            <div class="textc" v-if=" !lists.length || lists.length < 0">暂无数据</div>
                        </div>

                        <div class="card m-b-0" v-if="navs_id==2">
                            <table class="align-cen-table textc display nowrap table table-hover table-bordered bgf6f9fa m-b-20">
                                <thead>
                                <tr>
                                    <th>公司名称</th>
                                    <th>管理员名称</th>
                                    <th>联系电话</th>
                                    <th>订单金额（元）</th>
                                    <th>实际到账金额（元）</th>
                                    <th>可提现金额（元）</th>
                                    <th>申请提现金额（元）</th>
                                    <th>申请时间</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody class="bgfff">
                                <tr v-for="(v,k) in lists" :key="k" class="curpointer">
                                    <td :title="v.ordersNo">{{v.ordersNo}}</td>
                                    <td>{{v.ordersId}}</td>
                                    <td :title="v.nickeName">{{v.nickeName}}</td>
                                    <td :title="v.phone">{{v.phone}}</td>
                                    <td :title="v.locationAddress + v.detailedAddress">{{v.locationAddress + v.detailedAddress}}</td>
                                    <td :title="v.goodsName">{{v.goodsName}}</td>
                                    <td :title="v.specAttribute">{{v.specAttribute}}</td>
                                    <td :title="v.specAttribute">{{v.specAttribute}}</td>
                                    <td>
                                        <span @click="operationConfirm(1)">通过</span>
                                        <span @click="operationConfirm(2)">驳回</span>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                            <div class="textc" v-if=" !lists.length || lists.length < 0">暂无数据</div>
                        </div>
                        <!--分页-->
                        <div class="d-flex p-b-50 jsend">
                            <page-helper :page-number="page" :total-count="total" @change="jumpPage"></page-helper>
                        </div>

                    </div>

                </div>


            </div>
        </div>

    </div>
</div>
<!-- All Jquery -->
<!-- ============================================================== -->
<script src="./js/jquery.min.js"></script>

<script src="./js/bootstrap.min.js"></script>
<script src="./js/perfect-scrollbar.jquery.min.js"></script>
<script src="./js/sidebarmenu.js"></script>
<!--Custom JavaScript -->
<script src="./js/custom.min.js"></script>
<script src="./js/layer/layer.js"></script>
<!-- ============================================================== -->

<script src="./js/vue.js"></script>
<script src="./js/config.js"></script><script src="./js/extend.js"></script>
<script>
    $(function () {
        var vw = new Vue({
            el: '#main-wrapper',
            data: {
                lists: [{}, {}, {}],
                // 总数
                total: 0,
                page: 1,
                navs_id: '1',
                selectRows: [],
                navs:[
                    { id: '1', label: '提现申请' },
                    { id: '2', label: '提现记录' },
                ],
            },
            mounted() {

            },
            methods:{
                operationConfirm(type){
                    let text = type == 1
                        ? `确认审核提现审核通过吗？`
                        : `<textarea class="form-control" id="reason"></textarea>`;

                    layer.confirm(text, {
                        title: type == 1 ? '确认审核' : '驳回原因',
                        skin: 'confirm-class',
                        btn: ['取消', '确定'],
                        area: [type == 1 ? '400px': '500px', 'auto']
                    }, (idx)=>{
                        layer.close(idx);
                    },() =>{

                    });
                },
                jumpPage(){

                },
                // 获取提现申请列表
                getApplay(){

                },
                // 获取提现记录
                getWithdrawLog(){

                },
                checkAll(){
                    this.allChecks = !this.allChecks;
                },
                chooseRow(row){
                    let idx = this.selectRows.indexOf(row);
                    if (idx != -1){
                        this.selectRows.splice(idx, 1);
                    } else {
                        this.selectRows.push(row);
                    }
                },
                changeNav(id){
                    this.page = 1;
                    this.navs_id = id;
                },

            },
            computed:{
                allChecks:{
                    get(){
                        return this.selectRows.length && (this.selectRows.length == this.lists.length);
                    },
                    set(val){
                        if(val){
                            this.selectRows= [...this.lists];
                        }else{
                            this.selectRows = [];
                        }
                    },
                }
            },
        })
    })
</script>
</body>
</html>












